package com.yanqu.road.server.manger.kowloon.battle.buff;

import com.yanqu.road.entity.kowloon.enums.battle.eKowloonBuffEffectType;
import com.yanqu.road.server.manger.kowloon.battle.KowloonGame;
import com.yanqu.road.server.manger.kowloon.battle.role.bullet.KowloonBullet;
import com.yanqu.road.server.manger.kowloon.battle.role.bullet.KowloonBulletFootball;
import com.yanqu.road.server.manger.kowloon.battle.role.enemy.KowloonEnemy;

import java.util.Collections;
import java.util.List;

/**
 * 击退
 */
public class KowloonBuff5 extends KowloonBuff {

    public KowloonBuff5(KowloonGame game, KowloonBullet bullet, KowloonEnemy owner) {
        super(game, bullet, owner);
    }

    public double enemyY;

    @Override
    public void initData(){
        this.enemyY = this.owner.pos.getY() + ((KowloonBulletFootball) this.bullet).beatBackDistance;
    }

    @Override
    public List<KowloonBuffEffect> getBuffEffect() {
        return Collections.singletonList(new KowloonBuffEffect(eKowloonBuffEffectType.BeatBack, this.enemyY));
    }

}
